﻿<%@ Page Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="CustomerEdit.aspx.cs"
    Inherits="CrmContacto.WebApp.App.CustomerEdit" %>

<%@ Import Namespace="Web.Framework.Translate" %>
<%@ Register Assembly="Web.Framework" Namespace="Web.Framework.Controls" TagPrefix="Crm" %>
<asp:Content ID="HeaderContent" ContentPlaceHolderID="HeadContent" runat="server">
    <link href="/Styles/NestedGrid.css" rel="stylesheet" type="text/css" />
    <link href="/Styles/App/CustomerEdit.css" rel="stylesheet" type="text/css" />
    <script src="/Scripts/GridCtrl.js" type="text/javascript"></script>
    <script src="/Scripts/App/CustomerEdit.js" type="text/javascript"></script>
</asp:Content>
<asp:Content ID="BodyContent" ContentPlaceHolderID="MainContent" runat="server">
    <%--<h2>
        <asp:Literal ID="Literal1" runat="server" Text='<%$ Code:  LocalizationProvider.Instance["Bo.EditContacto.Titulo"]%>' />
       <img width="15px" height="15px" id="imgExpand" class="imgExpand" src="/Images/icon_blockexpanded.png"
            onclick="window.AppCommonObj.toggleVisibility(this.id, 'customerDataDiv');" alt="" />
        <span class="clear"></span>
    </h2>--%>
    <asp:HiddenField ID="hidSelectedTab" ClientIDMode="Static" runat="server" />
    <asp:Panel ID="pnlSecondTitle" CssClass="editionContainerFilter secondTitle" runat="server">
        <asp:Label ID="lblEmail" runat="server" Text="" ClientIDMode="Static"></asp:Label>
        <asp:Label ID="lblNombre" runat="server" Text="" ClientIDMode="Static"></asp:Label>
        <asp:Label ID="lblApellido" runat="server" Text="" ClientIDMode="Static"></asp:Label>
        <asp:Label ID="lblNroDocumento" runat="server" Text="" ClientIDMode="Static"></asp:Label>
    </asp:Panel>
    <div id="tabs" class="customerTabs">
        <ul>
            <li><a href="#customerDataDiv">
                <asp:Literal ID="Literal1" runat="server" Text='<%$ Code:  LocalizationProvider.Instance["Bo.EditContacto.Titulo"]%>' /></a></li>
            <li><a href="#pnlVentas">
                <asp:Literal ID="Literal4" runat="server" Text='<%$ Code:  LocalizationProvider.Instance["Bo.EditContacto.ListadoCompras"]%>' /></a></li>
            <li><a href="#pnlListasDeDistribucion">
                <asp:Literal ID="Literal6" runat="server" Text='<%$ Code:  LocalizationProvider.Instance["Bo.EditContacto.ListaDeDistribucion"]%>' /></a></li>
            <li><a href="#pnlBitacora">
                <asp:Literal ID="Literal19" runat="server" Text='<%$ Code:  LocalizationProvider.Instance["Bitacora"]%>' /></a></li>
        </ul>
        <div id="customerDataDiv">
            <div class="clear">
            </div>
            <asp:Panel ID="pnlCustomerControlsForEdition" runat="server" >            
            <div class="editionContainerFilter">
                <div class="divDatosLeft">
                    <div class="divp">
                        <span class="title2">
                            <asp:Literal ID="Literal9" runat="server" Text='<%$ Code:  LocalizationProvider.Instance["Contacto.TipoDocumento"]%>' />:</span>
                        <asp:DropDownList ID="cboTipoDocumento" runat="server" CssClass="cbo" ClientIDMode="Static">
                        </asp:DropDownList>
                    </div>
                    <div class="clear">
                    </div>
                    <p>
                        <span class="title2">
                            <asp:Literal ID="Literal10" runat="server" Text='<%$ Code:  LocalizationProvider.Instance["Contacto.DocumentoShort"]%>' />:</span>
                        <asp:TextBox ID="txtDNI" runat="server" CssClass="inputs" ClientIDMode="Static" title='<%$ Code:  LocalizationProvider.Instance["Contacto.Documento.Tooltip"] %>'></asp:TextBox>
                    </p>
                    <div class="clear">
                    </div>
                    <p>
                        <span class="title2">
                            <asp:Literal ID="Literal22" runat="server" Text='<%$ Code:  LocalizationProvider.Instance["Contacto.Email"]%>' />:</span>
                        <asp:TextBox ID="txtEmail" runat="server" CssClass="inputs inputlong" ClientIDMode="Static"
                            title='<%$ Code:  LocalizationProvider.Instance["Contacto.Email.Tooltip"] %>'></asp:TextBox>
                    </p>
                    <div class="clear">
                    </div>
                    <div class="divp">
                        <span class="title2">
                            <asp:Literal ID="Literal12" runat="server" Text='<%$ Code:  LocalizationProvider.Instance["Contacto.EstadoEmail"]%>' />:</span>
                        <asp:DropDownList ID="cboEstadoEmail" runat="server" CssClass="cbo readonly" ClientIDMode="Static"
                            Enabled="false">
                        </asp:DropDownList>
                    </div>
                    <div class="clear">
                    </div>
                    <p>
                        <span class="title2">
                            <asp:Literal ID="Literal27" runat="server" Text='<%$ Code:  LocalizationProvider.Instance["Contacto.DeseaRecibirEmails"]%>' />:</span>
                        <asp:CheckBox ID="chkDeseaRecibirEmails" runat="server" Checked="true" />
                    </p>
                    <div class="clear">
                    </div>
                    <p>
                        <span class="title2">
                            <asp:Literal ID="Literal2" runat="server" Text='<%$ Code:  LocalizationProvider.Instance["Contacto.Nombre"]%>' />:</span>
                        <asp:TextBox ID="txtNombre" runat="server" CssClass="inputs inputlong" ClientIDMode="Static"
                            title='<%$ Code:  LocalizationProvider.Instance["Contacto.Nombre.Tooltip"] %>'></asp:TextBox>
                    </p>
                    <div class="clear">
                    </div>
                    <p>
                        <span class="title2">
                            <asp:Literal ID="Literal3" runat="server" Text='<%$ Code:  LocalizationProvider.Instance["Contacto.Apellido"]%>' />:</span>
                        <asp:TextBox ID="txtApellido" runat="server" CssClass="inputs inputlong" ClientIDMode="Static"
                            title='<%$ Code:  LocalizationProvider.Instance["Contacto.Apellido.Tooltip"] %>'></asp:TextBox>
                    </p>
                    <div class="clear">
                    </div>
                    <div class="divp">
                        <span class="title2">
                            <asp:Literal ID="Literal32" runat="server" Text='<%$ Code:  LocalizationProvider.Instance["Contacto.Sexo"]%>' />:</span>
                        <asp:DropDownList ID="cboSexo" runat="server" CssClass="cbo" ClientIDMode="Static">
                        </asp:DropDownList>
                    </div>
                    <div class="clear">
                    </div>
                    <div class="divp">
                        <span class="title2">
                            <asp:Literal ID="Literal13" runat="server" Text='<%$ Code:  LocalizationProvider.Instance["Pais"]%>' />:</span>
                        <asp:DropDownList ID="cboPais" runat="server" CssClass="cbo cbolong" ClientIDMode="Static">
                        </asp:DropDownList>
                        <asp:LinkButton ID="lnkIrAPais" CssClass="lnkVerClass" runat="server" OnClick="lnkIrPais_Click">
                            <asp:Literal ID="Literal28" runat="server" Text='<%$ Code: LocalizationProvider.Instance["Bo.Command.Ver"]%>' /></asp:LinkButton>
                    </div>
                    <div class="clear">
                    </div>
                    <div class="divp">
                        <span class="title2">
                            <asp:Literal ID="Literal14" runat="server" Text='<%$ Code:  LocalizationProvider.Instance["Provincia"]%>' />:</span>
                        <asp:DropDownList ID="cboProvincia" runat="server" CssClass="cbo cbolong" ClientIDMode="Static">
                        </asp:DropDownList>
                    </div>
                    <div class="clear">
                    </div>
                    <div class="divp">
                        <span class="title2">
                            <asp:Literal ID="Literal18" runat="server" Text='<%$ Code:  LocalizationProvider.Instance["Cumpleanios"]%>' />:</span>
                        <asp:DropDownList ID="cboCumpleDia" runat="server" CssClass="cboDia" ClientIDMode="Static">
                        </asp:DropDownList>
                        <asp:DropDownList ID="cboCumpleMes" runat="server" CssClass="cboMes" ClientIDMode="Static">
                        </asp:DropDownList>
                        <asp:DropDownList ID="cboCumpleAnio" runat="server" CssClass="cboAnio" ClientIDMode="Static">
                        </asp:DropDownList>
                    </div>
                    <div class="clear">
                    </div>
                </div>
                <div class="divDatosRight">
                    <div class="clear">
                    </div>
                    <p class="lstp">
                        <span class="title2">
                            <asp:Literal ID="Literal17" runat="server" Text='<%$ Code:  LocalizationProvider.Instance["Categorias"]%>' />:</span>
                        <asp:ListBox ID="lstCategorias" runat="server" CssClass="lst searchLst" SelectionMode="Multiple"
                            ClientIDMode="Static"></asp:ListBox>
                        <asp:LinkButton ID="lnkCategoriasIrA" CssClass="lnkVerClass" runat="server" OnClick="lnkCategoriasIrAs_Click">
                            <asp:Literal ID="Literal29" runat="server" Text='<%$ Code: LocalizationProvider.Instance["Bo.Command.Ver"]%>' /></asp:LinkButton>
                    </p>
                    <div class="clear">
                    </div>
                    <p>
                        <span class="title2">
                            <asp:Literal ID="Literal15" runat="server" Text='<%$ Code:  LocalizationProvider.Instance["Contacto.Domicilio"]%>' />:</span>
                        <asp:TextBox ID="txtDomicilio" runat="server" CssClass="inputs inputlong" ClientIDMode="Static"
                            title='<%$ Code:  LocalizationProvider.Instance["Contacto.Domicilio.Tooltip"] %>'></asp:TextBox>
                    </p>
                    <div class="clear">
                    </div>
                    <p>
                        <span class="title2">
                            <asp:Literal ID="Literal16" runat="server" Text='<%$ Code:  LocalizationProvider.Instance["Contacto.CodigoPostal"]%>' />:</span>
                        <asp:TextBox ID="txtCodigoPostal" runat="server" CssClass="inputs inputlong" ClientIDMode="Static"
                            title='<%$ Code:  LocalizationProvider.Instance["Contacto.CodigoPostal.Tooltip"] %>'></asp:TextBox>
                    </p>
                    <div class="clear">
                    </div>
                    <p>
                        <span class="title2">
                            <asp:Literal ID="Literal7" runat="server" Text='<%$ Code:  LocalizationProvider.Instance["Contacto.Telefono"]%>' />:</span>
                        <asp:TextBox ID="txtTelefono" runat="server" CssClass="inputs" ClientIDMode="Static"
                            title='<%$ Code:  LocalizationProvider.Instance["Contacto.Telefono.Tooltip"] %>'></asp:TextBox>
                    </p>
                    <div class="clear">
                    </div>
                    <p>
                        <span class="title2">
                            <asp:Literal ID="Literal8" runat="server" Text='<%$ Code:  LocalizationProvider.Instance["Contacto.Credencial"]%>' />:</span>
                        <asp:TextBox ID="txtCredencial" runat="server" CssClass="inputs" ClientIDMode="Static"
                            title='<%$ Code:  LocalizationProvider.Instance["Contacto.Credencial.Tooltip"] %>'></asp:TextBox>
                    </p>
                    <div class="clear">
                    </div>
                    <div class="divp">
                        <span class="title2">
                            <asp:Literal ID="Literal5" runat="server" Text='<%$ Code:  LocalizationProvider.Instance["Contacto.Origen"]%>' />:</span>
                        <asp:DropDownList ID="cboOrigen" runat="server" CssClass="cbo readonly" ClientIDMode="Static"
                            Enabled="false">
                        </asp:DropDownList>
                        <asp:TextBox ID="txtOrigenPuntoDeVenta" runat="server" CssClass="inputs inputlong readonly"
                            Visible="false" ReadOnly="true" ClientIDMode="Static" title='<%$ Code:  LocalizationProvider.Instance["Contacto.OrigenPtoVta.Tooltip"] %>'></asp:TextBox>
                    </div>
                    <div class="clear">
                    </div>
                    <div class="divp">
                        <span class="title2">
                            <asp:Literal ID="Literal11" runat="server" Text='<%$ Code:  LocalizationProvider.Instance["Contacto.Estado"]%>' />:</span>
                        <asp:DropDownList ID="cboEstado" runat="server" CssClass="cbo readonly" ClientIDMode="Static"
                            Enabled="false">
                        </asp:DropDownList>
                    </div>
                    <div class="clear">
                    </div>
                    <p>
                        <span class="title2">
                            <asp:Literal ID="Literal31" runat="server" Text='<%$ Code:  LocalizationProvider.Instance["Contacto.CantidadHijos"]%>' />:</span>
                        <asp:DropDownList ID="cboCantidadHijos" runat="server" CssClass="cbo" ClientIDMode="Static"
                           >
                        </asp:DropDownList>
                    </p>
                    <div class="clear">
                    </div>
                    <p class="divp">
                        <span class="title2">
                            <asp:Literal ID="Literal33" runat="server" Text='<%$ Code:  LocalizationProvider.Instance["Contacto.EdadHijoMenor"]%>' />:</span>
                        <asp:DropDownList ID="cboEdadHijoMenor" runat="server" CssClass="cbo" ClientIDMode="Static"
                            >
                        </asp:DropDownList>
                    </p>
                    <div class="clear">
                    </div>
                </div>
                <div class="clear">
                </div>
                <div class="commandBarDiv">
                    <asp:LinkButton ID="lnkGuardar" runat="server" CssClass="lnkCommand" OnClick="lnkGuardar_Click"
                        ClientIDMode="Static" OnClientClick="return window.CustomerEditObj.ValidateGuardar();">
                        <asp:Literal ID="Literal26" runat="server" Text='<%$ Code: LocalizationProvider.Instance["Bo.Command.Guardar"]%>' /></asp:LinkButton>
                    <div class="clear">
                    </div>
                </div>
            </div>
            </asp:Panel>
        </div>
        <%-- <h2>
            <asp:Image Width="15px" Height="15px" ID="imgExpandResults" CssClass="imgExpand"
                ImageUrl="/Images/icon_blockcollapsed.png" runat="server" ClientIDMode="Static"
                alt="" onclick="window.AppCommonObj.toggleVisibility(this.id, 'pnlVentas');" />
            <asp:Literal ID="Literal19" runat="server" Text='<%$ Code:  LocalizationProvider.Instance["Bo.EditContacto.ListadoCompras"]%>' />
        </h2>--%>
        <asp:Panel ID="pnlVentas" CssClass="editionContainerForGrid" runat="server" ClientIDMode="Static">
            <div class="clear">
            </div>
            <div>
            <div class="divExportarAExcelGrid">
                <asp:LinkButton ID="lnkExportarAExcel" CssClass="promolnkExportarAExcel" ClientIDMode="Static"
                    OnClick="lnkExportarAExcelVentas_Click" runat="server">
                    <img style="text-decoration: none; border: 0px; margin-right: 4px" src="../Images/excel.png"
                        alt="" /><asp:Literal ID="Literal34" runat="server" Text='<%$ Code: LocalizationProvider.Instance["Bo.SearchContacto.CmdExportarExcel"]%>' /></asp:LinkButton>
            </div>
            <div class="clear">
            </div>
            </div>
            <Crm:GridCtrl ID="GridCtrlVentas" runat="server" TableBorder="1" CollapseImageSrc="/images/iconBig_blockcollapsed.png"
                ExpandImageSrc="/images/iconBig_blockexpanded.png" />
        </asp:Panel>
        <div class="clear">
        </div>
        <%-- <h2>
            <asp:Image Width="15px" Height="15px" ID="Image2" CssClass="imgExpand" ImageUrl="/Images/icon_blockcollapsed.png"
                runat="server" ClientIDMode="Static" alt="" onclick="window.AppCommonObj.toggleVisibility(this.id, 'pnlListasDeDistribucion');" />
            <asp:Literal ID="Literal20" runat="server" Text='<%$ Code:  LocalizationProvider.Instance["Bo.EditContacto.ListaDeDistribucion"]%>' />
        </h2>--%>
        <asp:Panel ID="pnlListasDeDistribucion" CssClass="editionContainerForGrid" runat="server"
            ClientIDMode="Static">
            <div class="clear">
            </div>
            <div >
             <div class="divExportarAExcelGrid">
                <asp:LinkButton ID="LinkButton1" CssClass="promolnkExportarAExcel" ClientIDMode="Static"
                    OnClick="lnkExportarAExcelListaDistribucion_Click" runat="server">
                    <img style="text-decoration: none; border: 0px; margin-right: 4px" src="../Images/excel.png"
                        alt="" /><asp:Literal ID="Literal35" runat="server" Text='<%$ Code: LocalizationProvider.Instance["Bo.SearchContacto.CmdExportarExcel"]%>' /></asp:LinkButton>
            </div>
            <div class="clear">
            </div>
            </div>
            <asp:Panel ID="pnlCustomerControlsListaDistribucionForEdit" runat="server" >  
            <asp:GridView ID="GridListasDistribucion" runat="server" CellPadding="4" ForeColor="#333333"
                GridLines="None" AutoGenerateColumns="False" DataKeyNames="Id" Width="100%" AllowPaging="True"
                PageSize="15" OnPageIndexChanging="GridListasDistribucion_PageIndexChanging"
                OnRowCommand="GridListasDistribucion_RowCommand" OnRowDataBound="GridListasDistribucion_RowDataBound">
                <AlternatingRowStyle BackColor="White" />
                <Columns>
                    <asp:TemplateField HeaderText="">
                        <HeaderStyle HorizontalAlign="Left" Width="30px" />
                        <ItemStyle HorizontalAlign="Center" />
                        <ItemTemplate>
                            <asp:ImageButton ID="btnEditar" runat="server" ImageUrl="~/Images/editar.png" CommandName="editar"
                                CommandArgument="<%# ((GridViewRow) Container).RowIndex %>" />
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="">
                        <HeaderStyle HorizontalAlign="Left" Width="30px" />
                        <ItemStyle HorizontalAlign="Center" />
                        <ItemTemplate>
                            <asp:ImageButton ID="btnEliminar" runat="server" ImageUrl="~/Images/eliminar.png"
                                CommandName="eliminar" CommandArgument="<%# ((GridViewRow) Container).RowIndex %>" />
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:BoundField DataField="Nombre" HeaderText='<%$ Code: LocalizationProvider.Instance["ListaDistribucion.Nombre"] %>'>
                        <HeaderStyle HorizontalAlign="Left" />
                    </asp:BoundField>
                    <asp:BoundField DataField="Descripcion" HeaderText='<%$ Code: LocalizationProvider.Instance["ListaDistribucion.Descripcion"] %>'>
                        <HeaderStyle HorizontalAlign="Left" />
                    </asp:BoundField>
                    <asp:BoundField DataField="Estado" HeaderText='<%$ Code: LocalizationProvider.Instance["ListaDistribucion.Estado"] %>'>
                        <HeaderStyle HorizontalAlign="Left" />
                    </asp:BoundField>
                </Columns>
                <EditRowStyle BackColor="#2461BF" />
                <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                <HeaderStyle BackColor="#4b6c9e" Font-Bold="True" ForeColor="White" HorizontalAlign="Left"
                    CssClass="gridSortingHeader" />
                <PagerStyle BackColor="#4b6c9e" ForeColor="White" HorizontalAlign="Center" />
                <RowStyle BackColor="#EFF3FB" />
                <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                <SortedAscendingCellStyle BackColor="#F5F7FB" />
                <SortedAscendingHeaderStyle BackColor="#6D95E1" CssClass="gridSortingHeader" />
                <SortedDescendingCellStyle BackColor="#E9EBEF" />
                <SortedDescendingHeaderStyle BackColor="#4870BE" CssClass="gridSortingHeader" />
            </asp:GridView>
            </asp:Panel>
        </asp:Panel>
        <div class="clear">
        </div>
        <%--<h2>
            <asp:Image Width="15px" Height="15px" ID="Image1" CssClass="imgExpand" ImageUrl="/Images/icon_blockcollapsed.png"
                runat="server" ClientIDMode="Static" alt="" onclick="window.AppCommonObj.toggleVisibility(this.id, 'pnlBitacora');" />
            <asp:Literal ID="Literal21" runat="server" Text='<%$ Code:  LocalizationProvider.Instance["Bitacora"]%>' />
        </h2>--%>
        <asp:Panel ID="pnlBitacora" CssClass="editionContainerForGrid" runat="server" ClientIDMode="Static">
        <asp:Panel ID="pnlCustomerControlsBitacoraForEdit" runat="server"  >  
            <div class="clear">
            </div>
            <h2>
                <asp:Image Width="15px" Height="15px" ID="Image1" CssClass="imgExpand" ImageUrl="/Images/icon_blockexpanded.png"
                    runat="server" ClientIDMode="Static" alt="" onclick="window.AppCommonObj.toggleVisibility(this.id, 'divNuevoRegistroBitacora');" />
                <asp:Literal ID="Literal100" runat="server" Text='<%$ Code:  LocalizationProvider.Instance["BitacoraEdit.AgregarNuevoMensaje"]%>' />
            </h2>
            <div class="editionContainerFilter" id="divNuevoRegistroBitacora">
                <div class="clear">
                </div>
                <div class="divp">
                    <span class="title2">
                        <asp:Literal ID="Literal21" runat="server" Text='<%$ Code:  LocalizationProvider.Instance["Bitacora.TipoRegistroBitacora"]%>' />:
                    </span>
                    <asp:DropDownList ID="cboTipoRegistroBitacora" runat="server" CssClass="cbo" ClientIDMode="Static">
                    </asp:DropDownList>
                </div>
                <div class="clear">
                </div>
                <asp:Panel ID="pnlTipoMensajeBitacora" CssClass="divp" runat="server">
                    <span class="title2">
                        <asp:Literal ID="Literal25" runat="server" Text='<%$ Code:  LocalizationProvider.Instance["Bitacora.TipoMensajeBitacora"]%>' />:
                    </span>
                    <asp:DropDownList ID="cboTipoMensajeBitacoraId" runat="server" CssClass="cbo" ClientIDMode="Static">
                    </asp:DropDownList>
                    <asp:LinkButton ID="lnkIrATipoMensaje" CssClass="lnkVerClass" runat="server" OnClick="lnkIrATipoMensaje_Click">
                        <asp:Literal ID="Literal30" runat="server" Text='<%$ Code: LocalizationProvider.Instance["Bo.Command.Ver"]%>' /></asp:LinkButton>
                </asp:Panel>
                <div class="clear">
                </div>
                <p>
                    <span class="title2">
                        <asp:Literal ID="Literal23" runat="server" Text='<%$ Code:  LocalizationProvider.Instance["Bitacora.Accion"]%>' />:</span>
                    <asp:TextBox ID="txtAccion" runat="server" CssClass="inputs inputMultiline" TextMode="MultiLine"
                        MaxLength="400" ClientIDMode="Static" title='<%$ Code:  LocalizationProvider.Instance["Bitacora.Accion"] %>'></asp:TextBox>
                </p>
                <div class="clear">
                </div>
                <div class="commandBarDiv">
                    <asp:LinkButton ID="lnkGuardarBitacora" runat="server" CssClass="lnkCommand" OnClick="lnkGuardarBitacora_Click"
                        ClientIDMode="Static">
                        <asp:Literal ID="Literal24" runat="server" Text='<%$ Code: LocalizationProvider.Instance["Bo.Command.Guardar"]%>' /></asp:LinkButton>
                    <div class="clear">
                    </div>
                </div>
            </div>
            <div>
            <h2 class="h2Excel">
                <asp:Image Width="15px" Height="15px" ID="Image2" CssClass="imgExpand" ImageUrl="/Images/icon_blockexpanded.png"
                    runat="server" ClientIDMode="Static" alt="" onclick="window.AppCommonObj.toggleVisibility(this.id, 'mensajesDeBitacora');" />
                <asp:Literal ID="Literal20" runat="server" Text='<%$ Code:  LocalizationProvider.Instance["BitacoraEdit.Registros"]%>' />
            </h2>
            <div class="divExportarAExcelGrid">
                <asp:LinkButton ID="LinkButton2" CssClass="promolnkExportarAExcel" ClientIDMode="Static"
                    OnClick="lnkExportarAExcelBitacora_Click" runat="server">
                    <img style="text-decoration: none; border: 0px; margin-right: 4px" src="../Images/excel.png"
                        alt="" /><asp:Literal ID="Literal36" runat="server" Text='<%$ Code: LocalizationProvider.Instance["Bo.SearchContacto.CmdExportarExcel"]%>' /></asp:LinkButton>
            </div>
            <div class="clear">
            </div>
            </div>
            <div id="mensajesDeBitacora">
                <asp:GridView ID="GridBitacora" runat="server" CellPadding="4" ForeColor="#333333"
                    ViewStateMode="Disabled" GridLines="None" AutoGenerateColumns="False" DataKeyNames="Id"
                    Width="100%" AllowPaging="True" PageSize="15" OnPageIndexChanging="GridBitacora_PageIndexChanging"
                    OnRowCommand="GridBitacora_RowCommand" OnRowDataBound="GridBitacora_RowDataBound">
                    <AlternatingRowStyle BackColor="White" />
                    <Columns>
                        <asp:BoundField DataField="Id" HeaderText="Id" Visible="false">
                            <HeaderStyle HorizontalAlign="Left" />
                        </asp:BoundField>
                        <asp:BoundField DataField="TipoRegistroBitacora" HeaderText='<%$ Code:  LocalizationProvider.Instance["Bitacora.TipoRegistroBitacora"] %>'>
                            <HeaderStyle HorizontalAlign="Left" />
                        </asp:BoundField>
                        <asp:BoundField DataField="TipoMensajeBitacoraId" HeaderText='<%$ Code:  LocalizationProvider.Instance["Bitacora.TipoMensajeBitacoraId"] %>'>
                            <HeaderStyle HorizontalAlign="Left" />
                        </asp:BoundField>
                        <asp:BoundField DataField="FechaCreacion" HeaderText='<%$ Code:  LocalizationProvider.Instance["Bitacora.FechaCreacion"] %>'
                            DataFormatString="{0:dd/MM/yyyy}">
                            <HeaderStyle HorizontalAlign="Left" />
                        </asp:BoundField>
                        <asp:BoundField DataField="Accion" HeaderText='<%$ Code:  LocalizationProvider.Instance["Bitacora.Accion"] %>'>
                            <HeaderStyle HorizontalAlign="Left" />
                        </asp:BoundField>
                         <asp:BoundField DataField="AuditUserNameCreacion" HeaderText='<%$ Code:  LocalizationProvider.Instance["Auditoria.UsuarioCreador"] %>'>
                            <HeaderStyle HorizontalAlign="Left" />
                        </asp:BoundField>
                    </Columns>
                    <EditRowStyle BackColor="#2461BF" />
                    <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                    <HeaderStyle BackColor="#4b6c9e" Font-Bold="True" ForeColor="White" HorizontalAlign="Left"
                        CssClass="gridSortingHeader" />
                    <PagerStyle BackColor="#4b6c9e" ForeColor="White" HorizontalAlign="Center" />
                    <RowStyle BackColor="#EFF3FB" />
                    <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                    <SortedAscendingCellStyle BackColor="#F5F7FB" />
                    <SortedAscendingHeaderStyle BackColor="#6D95E1" CssClass="gridSortingHeader" />
                    <SortedDescendingCellStyle BackColor="#E9EBEF" />
                    <SortedDescendingHeaderStyle BackColor="#4870BE" CssClass="gridSortingHeader" />
                </asp:GridView>
            </div>
        </asp:Panel>
        </asp:Panel>
        <div class="clear">
        </div>
    </div>
    <div class="clear">
    </div>
    <script type='text/javascript'>

        $(document).ready(function () {

            if (!window.AppCommonObj) {
                window.AppCommonObj = new AppCommon();
            }

            if (!window.CrmCommonObj) {
                window.CrmCommonObj = new CrmCommon();
            }           

            $('.searchLst').dropdownchecklist(
             { icon: {},
                 width: 250,
                 maxDropHeight: 200
             });

            //            window.AppCommonObj.initializeEnterKeyEvent($('#resultDiv'), function () {
            //                __doPostBack($('#lnkBuscar').attr('aspnetid'), '');
             //            });  

            $('input[title]').inputHints();

            window.CustomerEditObj = new CustomerEdit();

            new GridCtrl('<%= this.GridCtrlVentas.ClientID %>');


            document.DirtyCheck = new DirtyCheck();
            document.DirtyCheck.loadControlState();

            AppCommonObj.ConfirmMovePage();

            $("#tabs").tabs( { selected: <%= (int)currentTab %>,
                               disabled: <%=disabledTabs %>,
                               select: function(event, ui) {  
                                //
                               if(ui.index != 0 && document.DirtyCheck.areControlsDirty())
                               {
                                  return confirm(JsLocalization_DirtyMessageConfirmContinue);
                               }
                              } 
             });                
             
             if($('#lstCategorias').attr('inhabilitar') != null)
             {
                 $('#lstCategorias').dropdownchecklist("disable");
             }                                     

        });
    </script>
</asp:Content>
